FROM rwj/conda:1.0

WORKDIR /home/ECMWFdownload/ECdownload

ADD ./config.yml /home/ECMWFdownload/ECdownload/
ADD ./*.py /home/ECMWFdownload/ECdownload/
ADD ./*.sh /home/ECMWFdownload/ECdownload/
ADD ./requirements.txt /home/ECMWFdownload/ECdownload/
ADD ./process /home/ECMWFdownload/ECdownload/process

RUN mkdir /home/ECMWFdownload/data/forecast \
    && mkdir /home/ECMWFdownload/data/netcdf

RUN conda install -c conda-forge cfgrib
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/

CMD ["/bin/bash", "start.sh"]
